﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FAQFrameworks;
using DTOFrameworks;
using System.Web.UI;

namespace FooFun.Web.Controls
{
    // 版块中的未结束问题
    // todo: 分页的实现的进一步调整
    public class UnSealedTopicOfForum : PagedDataElement
    {
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            TopicManager topicManager = new TopicManager();

            base.TotalCount = topicManager.CountForumTopic(
                FAQContext.Current.ForumId, TopicStatus.Asked);

            this.DataElement = topicManager.ListTopicNoAnswer(
                FAQContext.Current.ForumId,
                FAQContext.Current.PageIndex,
                base.PageSize);
        }

    }


}
